﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace SQL_Provider
{
   public class MaHoa
    {
        public string MD5Format(string Chuoi)
        {
            MD5 MyMd5 = MD5.Create();
            byte[] HashCode=MyMd5.ComputeHash(Encoding.Unicode.GetBytes(Chuoi));
            StringBuilder SB = new StringBuilder();
            for (int i = 0; i < HashCode.Length; i++)
            {
                SB.Append(HashCode[i].ToString("x2"));
              
            }
            return SB.ToString();
        }
    }
}
